package com.time.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author 张龙佼
 * @Description 商品分类基本 实体类
 * @since 2020-10-14
 */

@Data
@Alias("ProductCategory")
public class ProductCategory implements Serializable {
    private static final long serialVersionUID = 371285047683330139L;
    public static final String PRODUCT_CATEGORY_IN_SESSION = "PRODUCT_CATEGORY_IN_SESSION";

    @TableId()
    private Integer id;          // 编号

    private String name;         // 名字

    private Integer parentId;    // 父分类

    @TableField(exist = false)
    private List<ProductCategory> productCategoryChildren = new ArrayList<>();
}